# awk  -v feed=1000 -v VD=10 -f GenVSingleDomain.awk aaa >  config/VNS.veh
# Attention !!! change range in par file to 300m
BEGIN	{ LaneLength = 295; 
          i=0;x=0; N=0; phase = 0.0; range = 296.6; data = 555; period = 0.1;
          srand(feed);

		  if(VD == 414)
		  {  lnd1 = 4; lnd2 = 4; lnd3 = 5; }	# N = 102 vehicles
		  if(VD == 302)
		  {  lnd1 = 5; lnd2 = 5; lnd3 = 9; }	# N = 102 vehicles
		  if(VD == 252)
		  {  lnd1 = 5; lnd2 = 8; lnd3 = 10; }	# N = 102 vehicles
		  if(VD == 200)
		  {  lnd1 = 6; lnd2 = 10; lnd3 = 15; }	# N = 102 vehicles
		  if(VD == 150)
		  {  lnd1 = 10; lnd2 = 12; lnd3 = 15; }	# N = 102 vehicles
		  if(VD == 124)
		  {  lnd1 = 10; lnd2 = 17; lnd3 = 22; }	# N = 102 vehicles
		  if(VD == 102)
		  {  lnd1 = 15; lnd2 = 18; lnd3 = 22; }	# N = 102 vehicles
		  if(VD == 94)
		  {  lnd1 = 15; lnd2 = 20; lnd3 = 25; }	# N = 102 vehicles
		  if(VD == 74)
		  {  lnd1 = 20; lnd2 = 25; lnd3 = 30; }	# N = 102 vehicles
		  if(VD == 42)
		  {  lnd1 = 40; lnd2 = 45; lnd3 = 55; }	# N = 102 vehicles
		  if(VD == 18)
		  {  lnd1 = 100; lnd2 = 100; lnd3 = 100; }	# N = 102 vehicles

          while (x < LaneLength) {
            lane = 0; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 5; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd1; 
            N+=2;
          }
	  	  x=0;
          while (x < LaneLength) {
            lane = 1; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 4; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd2; 
            N+=2;
          }
          x=0;
          while (x < LaneLength) {
            lane = 2; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 3; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd3; 
            N+=2;
          }

          printf ("%d\n", N);
        }
	{}
END	{ }
